//
//  common.hpp
//  yuzon
//
//  Created by Alvin on 2023/4/4.
//

#pragma once

#include <opencv2/opencv.hpp>

struct HumanResult {
  int class_id;
  float score;
  cv::Rect rect;
  std::string class_name;
  cv::Scalar color;
};

struct KeypointResult {
  int num_joints;
  std::vector<float> keypoints;
};

typedef std::vector<HumanResult> HumanResults;
typedef std::vector<KeypointResult> KeypointResults;

// human detector
extern int kHumanInputWidth;
extern int kHumanInputHeight;
extern float kHumanThreshold;

// keypoint detector
extern int kKeypointInputWidth;
extern int kKeypointInputHeight;
extern float kKeypointThreshold;
extern bool kDark;

// pipeline
extern bool kDrawBbox;
extern bool kDrawPose;
extern int kBboxLineThickness;
extern int kPoseKeypointNum;
extern int kPoseCircleRadius;
extern int kPoseLineThickness;

// scorer
extern std::vector<float> kStartAngle;
extern std::vector<int> kFrameOffsets;

// smoother
extern float kFcMin;
extern float kB;
extern float kFcD;

// utils
extern double kColors[237];

// visualizer
extern std::map<int, std::vector<std::vector<int>>> kEdges;
extern std::vector<cv::Scalar> kColorMap;
extern std::map<int, std::vector<int>> kColorIndexes;
